#ifndef REPORT_H
#define REPORT_H

#include <QWidget>
#include <QtCharts>
#include <QtCharts/QChart>
#include <QtCharts/QLineSeries>
#include "iexportable.h"

namespace Ui {
class Report;
}

class IDataExport;
class BllDataFlow;
class ExperimentInfo;
class Report : public QWidget, public IExportable
{
    Q_OBJECT

public:
    explicit Report(QWidget *parent = Q_NULLPTR);
    ~Report();

    void save(const QString &path);

private slots:
    void pdfSaveDone(const QString &info, const QString &path);
    void show(const ExperimentInfo &data);
    void retranslateUiSlot();
    void on_btnBack_clicked();
    void on_btnPrint_clicked();
    void on_btnExport_clicked();

private:
    void initWidget();
    void retranslateChart();

private:
    Ui::Report *ui;
    BllDataFlow *bdf;
    QChart *chartExpReport;
    QValueAxis *xAxisExpReport;
    QValueAxis *yAxisExpReport;
    QLineSeries *seriesExpReport;
    IDataExport *exportMgr;
};

#endif // REPORT_H
